The present invention relates to methods and apparatus for displaying the structure of a natural language sentence that has been input.
Conventionally, perfect analysis of the structure of a natural language is not possible in machine translation; the processing and the procedures required for this purpose are still not available. Thus, when machine translation is used, after the structure of a natural language sentence has been analyzed, the results provided by the analysis are displayed so that corrections can be made by a user.
The following problems, however, have arisen relative to the use of conventional displays for natural language structures. In conventional displays, lines and colors are employed to represent the relationships existing between words and phrases. But when lines are used in this manner to connect words and phrases, a user must trace the displayed lines in order to ascertain which grammatical elements are related. Under the circumstances, not only will a user find it difficult to trace a line to determine which words or which word and phrase it connects, but after tracing a line the user may find it difficult to understand how the grammatical elements are related. In addition, when the relationships existing between words and phrases are represented by the use of like colors for related elements, a user must search a display to ascertain for which elements the same colors are used, and again, the user may find it difficult to understand just how the grammatical elements are related.
To resolve these problems, it is one object of the present invention to provide methods and apparatus for displaying a natural language structure that can be easily understood by a user. To achieve this as well as other objects, the present invention provides various inventive methods and apparatus.
According to one aspect of the present invention, a method for displaying a natural language structure comprises the steps of: a) parsing a natural language sentence that is input to obtain predetermined grammatical elements; b) performing an analysis, based on a natural language grammar, of the relationships existing between the grammatical elements; and c) displaying and positioning the grammatical elements so as to demonstrate the relationships between them that was determined at the step b).
Since the individual grammatical elements of a natural language sentence are displayed to illustrate the relationships existing among the elements, the natural language structure can be easily identified.
In addition, according to one more aspect of the present invention, a method for displaying a natural language structure comprises the steps of: a) parsing a natural language sentence that is input to obtain predetermined grammatical elements; b) performing an analysis, based on a natural language grammar, of the relationships existing between the grammatical elements; c) vertically displaying and positioning, beginning at the top and continuing to the bottom, following the same order wherein they appeared in the natural language sentence, grammatical elements for which no relationships are established and those that are related to other, specified grammatical elements; d) displaying a source element for which the word relationship is the nearest word relationship for the elements displayed at the step c), in the same row as a destination element and following the same order wherein the elements appeared in the natural language sentence; e) inserting a new row immediately above a row whereon the destination element is displayed, when based on the natural language grammar, the word relationships existing between a source element and the elements displayed at the step c) are not the nearest, but instead, the source element is related to the order wherein the destination element appeared in the natural language sentence, so that the rear end of the source element is aligned with the front end of the destination element; f) inserting a new row immediately below a row in which the destination element is displayed, when based on the natural language grammar, the word relationships existing between the source element and the elements displayed at the step c) are not the nearest, but instead, are related to the inverted order wherein the destination element appeared in the natural language sentence, so that the front end of the source element is aligned with the rear end of the destination element; and g) repeating the steps d) to f) for elements for which the element displayed at the steps d) to f) is a destination.
According to another aspect of the present invention, a method for displaying a natural language structure comprises the steps of: a) parsing a natural language sentence that is input to obtain predetermined grammatical elements; b) performing an analysis, based on a natural language grammar, of the relationships existing between the grammatical elements; c) displaying an element that is not related to any other element; d) displaying a source element for which the word relationship is the nearest word relationship for the element displayed at the step c), in the same row as a destination element and following the same order wherein the elements appeared in the natural language sentence; e) inserting a new row immediately above a row whereon the destination element is displayed, when based on the natural language grammar, the word relationships existing between a source element and the element displayed at the step c) are not the nearest, but instead, the source element is related to the order wherein the destination element appeared in the natural language sentence, so that the rear end of the source element is aligned with the front end of the destination element; f) inserting a new row immediately below a row in which the destination element is displayed, when based on the natural language grammar, the word relationships existing between the source element and the element displayed at the step c) are not the nearest, but instead, are related to the inverted order wherein the destination element appeared in the natural language sentence, so that the front end of the source element is aligned with the rear end of the destination element; and g) repeating the steps d) to f) for elements for which the element displayed at the steps d) to f) is a destination.
According to an additional aspect of the present invention, a display attribute (e.g., highlighting, coloring, changing of a font, underlining, shading, etc.) is changed in accordance with a modification level (hereinafter the alteration of a display attribute and the display of the altered attribute is referred to as xe2x80x9chighlightingxe2x80x9d).
According to a further aspect of the present invention, apparatus for displaying a natural language structure comprises: input means for entering a natural language sentence; parsing means for parsing the natural language sentence to obtain predetermined elements; analysis means for analyzing a relationship existing between the elements based on the natural language grammar; and display means for displaying and positioning the elements to represent the relationship ascertained by the analysis means.
According to yet one more aspect of the present invention, apparatus for displaying a natural language structure comprises: input means for entering a natural language sentence; parsing means for parsing a natural language sentence that is input to obtain predetermined grammatical elements; analysis means for performing an analysis, based on a natural language grammar, of the relationships existing between the grammatical elements; first display means for vertically displaying and positioning, beginning at the top and continuing to the bottom, following the same order wherein they appeared in the natural language sentence, grammatical elements for which no relationships are established and those that are related to other, specified grammatical elements; second display means for displaying a source element for which the word relationship is the nearest word relationship for the elements displayed by the first display means, in the same row as a destination element and following the same order wherein the elements appeared in the natural language sentence; third display means for inserting a new row immediately above a row whereon the destination element is displayed, when based on the natural language grammar, the word relationships existing between a source element and the elements displayed by the first display means are not the nearest, but instead, the source element is related to the order wherein the destination element appeared in the natural language sentence, so that the rear end of the source element is aligned with the front end of the destination element; fourth display means for inserting a new row immediately below a row in which the destination element is displayed, when based on the natural language grammar, the word relationships existing between the source element and the elements displayed by the first display means are not the nearest, but instead, are related to the inverted order wherein the destination element appeared in the natural language sentence, so that the front end of the source element is aligned with the rear end of the destination element; and repeating means for repetitively employing the second to the fourth display means for elements for which the elements displayed by the second to the fourth display means are relationship destinations.
According to yet another aspect of the present invention, apparatus for displaying a natural language structure comprises: input means for entering a natural language sentence; parsing means for parsing a natural language sentence that is input to obtain predetermined grammatical elements; analysis means for performing an analysis, based on a natural language grammar, of the relationships existing between the grammatical elements; first display means for displaying an element that is not related to any other element; second display means for displaying a source element for which the word relationship is the nearest word relationship for the element displayed by the first display means, in the same row as a destination element and following the same order wherein the elements appeared in the natural language sentence; third display means for inserting a new row immediately above a row whereon the destination element is displayed, when based on the natural language grammar, the word relationships existing between a source element and the element displayed by the first display means are not the nearest, but instead, the source element is related to the order wherein the destination element appeared in the natural language sentence, so that the rear end of the source element is aligned with the front end of the destination element; fourth display means for inserting a new row immediately below a row in which the destination element is displayed, when based on the natural language grammar, the word relationships existing between the source element and the element displayed by the first display means are not the nearest, but instead, are related to the inverted order wherein the destination element appeared in the natural language sentence, so that the front end of the source element is aligned with the rear end of the destination element; and repeating means for repetitively employing the second to the fourth display means for elements for which the elements displayed by the second to the fourth display means are relationship destinations.
According to yet an additional aspect of the present invention, the apparatus further comprises highlighting means for highlighting the elements in accordance with the level of a modification.
The input means may be a mouse and a keyboard, the parsing means and the analysis means may be a CPU (Central Processing Unit), and the display means, or the first to the fourth display means, may be a CRT (Cathode Ray Tube), a liquid display, or a CRT interface.
These and other objects, features and advantages of the present invention will become apparent from the following detailed description of illustrative embodiments thereof, which is to be read in connection with the accompanying drawings.